IMAGE

Description

Passive element (does not respond to mouse or keyboard) that displays a single image.

For more information about image files, see the about images section.

Common Attributes

See common widgets attributes.

Specific Attributes
Name Value Type Default Value Description Comment V.

image

valid image file path

empty

Path to the image to display

For more information see the about images section.

1.0

image_mask

valid image file path

Image value with _mask postfix

Path to the alpha mask for the image.

This value is optional since by default it uses the same path as the 'image' attributes, to which it concatenates '_mask'. See examples below

1.0

repeat

boolean

false

Enables or disables the repetition of the image.

If set to 'true' and if the widget contains other widgets, the image will be repeated to cover the whole surface ofthe resulting cell.

1.0

Examples
<?xml version="1.0" encoding="utf-8" ?>
<SKIN language_version="1.0" background_color="#eeeeee">
   <IMAGE image="img.bmp" width="240" height="240" repeat="true" />
</SKIN>

<?xml version="1.0" encoding="utf-8" ?>
<SKIN language_version="1.0" background_color="#eeeeee">
   <IMAGE image="img.bmp" width="240" height="240" repeat="true" />
</SKIN>
directory listing

With the same xml file as the first example, we will obtain now:

The image is fully transparent when the image mask is black, and fully opaque when the image mask is white. The intermediate values (grey) are taken into account and the image then becomes partially transparent (visible here on the shadow of the image).

<?xml version="1.0" encoding="utf-8" ?>
<SKIN language_version="1.0" background_color="#eeeeee">
   <IMAGE image="img.bmp" />
   <IMAGE image="img.bmp" image_mask="" />
</SKIN>
<?xml version="1.0" encoding="utf-8" ?>
<SKIN language_version="1.0" background_color="#eeeeee">
   <IMAGE image="img.bmp" image_mask="anothermask.bmp" />
   <IMAGE image="img.bmp" />
</SKIN>
<?xml version="1.0" encoding="utf-8" ?>
<SKIN language_version="1.0" background_color="#eeeeee">
   <!-- start background image -->
   <IMAGE image="bg.bmp" repeat="true" spacing="20" layout_type="row">
      <!-- included image 1 -->
      <IMAGE image="img.bmp" />
      <!-- included image 2 -->
      <IMAGE image="img.bmp" />
   </IMAGE>
   <!-- end background image -->
</SKIN>

For more advanced capabilities, see the IMAGE_GROUP_BOX widget: it adapts the size of the graphics to the size of the contained widgets.